<!DOCTYPE html>
<html>
<head>
    <title>月结订单</title>
    <#include "/header.html">
    <!-- 文件上传 -->
    <link rel="stylesheet" href="${request.contextPath}/statics/plugins/oss/style.css">
    <script type="text/javascript" src="${request.contextPath}/statics/plugins/oss/js/plupload.full.min.js"></script>
    <script type="text/javascript" src="${request.contextPath}/statics/plugins/oss/ziyun_library.js"></script>
</head>
<style>
    #rrapp{
        word-break:break-all;
        overflow-x: hidden;
    }
    a:link,a:visited{
        text-decoration:none;
    }
</style>
<body>

<div id="rrapp" v-cloak>
    <!-- 列表 start -->
    <div v-show="showList">
        <!-- 查询 start -->
        <div class="grid-btn">
            <form class="form-inline" role="form">

                <a class="btn btn-default btn-sm" @click="reset"><i class="fa fa-refresh"></i></a>

                <a class="btn btn-primary btn-sm" @click="collectMoney">确认收款</a>

                <div class="form-group">
                    当前页应收总额：{{totalAmount}}
                </div>&nbsp;&nbsp;&nbsp;
                <div class="form-group">
                    合计应收总额：{{allTotalAmount}}
                </div>&nbsp;&nbsp;&nbsp;

                <div class="form-group">
                    <input type="text" class="form-control input-sm" v-model="q.orderNo" @keyup.enter="query" placeholder="订单号">
                </div>&nbsp;&nbsp;&nbsp;

                <div class="form-group">
                    <input type="text" class="form-control input-sm" v-model="q.memberName" @keyup.enter="query" placeholder="会员名">
                </div>&nbsp;&nbsp;&nbsp;

                <div class="form-group">
                    <select class="form-control input-sm" v-model="q.productionStatus" @keyup.enter="query">
                        <option value="">生产状态</option>
                        <option value="7">新开单</option>
                        <option value="3">生产中</option>
                        <option value="4">生产完成</option>
                        <option value="6">已完结</option>
                    </select>
                </div>&nbsp;&nbsp;&nbsp;

                <div class="form-group">
                    <select class="form-control input-sm" v-model="q.payStatus" @keyup.enter="query">
                        <option value="">付款状态</option>
                        <option value="'0'">未支付</option>
                        <option value="3">部分支付</option>
                        <option value="1">已支付</option>
                    </select>
                </div>&nbsp;&nbsp;&nbsp;


                <div class="form-group">
                    <input class="form-control input-sm" v-model="q.beginCreatetime" style="width: 120px;" @keyup.enter="query" @click = "checkBeginDate" placeholder="开始时间"/>
                    至
                    <input class="form-control input-sm" v-model="q.endCreatetime" style="width: 120px;"@keyup.enter="query" @click = "checkEndDate" placeholder="结束时间"/>
                </div>&nbsp;&nbsp;&nbsp;

                <a class="btn btn-default btn-sm"  @click="query"><i class="fa fa-search"></i>&nbsp;查询</a>
            </form>
        </div>
        <!-- 查询 end -->
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>

        <div style="margin-top: 10px;">
            <p style="font-size: 12px;">商品明细列表</p>
            <table id="orderItemTable"></table>
        </div>

    </div>
    <!-- 列表 end -->

    <!-- 确认收款 start -->
    <el-dialog title="确认收款" :visible.sync="collectMoneyFormVisible" width="30%">
        <el-form :model="collectMoneyForm" size="small">
            <el-form-item label="会员用户名：" :label-width="formLabelWidth">
                {{collectMoneyForm.memberName}}
            </el-form-item>
            <el-form-item label="收款方式：" :label-width="formLabelWidth">
                <el-select v-model="collectMoneyForm.payment" style="width: 80%" placeholder="请选择收款方式">
                    <el-option label="现金" value="现金"></el-option>
                    <el-option label="支付宝" value="支付宝"></el-option>
                    <el-option label="微信" value="微信"></el-option>
                    <el-option label="银联" value="银联"></el-option>
                    <el-option label="月结" value="月结"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="收款金额：" :label-width="formLabelWidth">
                <el-input v-model="collectMoneyForm.payed" style="width: 80%"></el-input>
            </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
            <el-button size="small" @click="collectMoneyFormVisible = false">取 消</el-button>
            <el-button size="small" type="primary" @click="orderPay">确 定</el-button>
        </div>
    </el-dialog>
    <!-- 确认收款 end -->

</div>

<script src="${request.contextPath}/statics/js/modules/order/monthlyorderinfo.js?_${.now?long}"></script>
</body>
</html>
